load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "types",
    srcs = [
        "etc.go",
        "eval_type.go",
        "field_type.go",
    ],
    importpath = "github.com/pingcap/tidb/parser/types",
    visibility = ["//visibility:public"],
    deps = [
        "//parser/charset",
        "//parser/format",
        "//parser/mysql",
        "//parser/terror",
        "@com_github_cznic_mathutil//:mathutil",
    ],
)

go_test(
    name = "types_test",
    timeout = "short",
    srcs = [
        "etc_test.go",
        "field_type_test.go",
    ],
    embed = [":types"],
    flaky = True,
    shard_count = 5,
    deps = [
        "//parser",
        "//parser/ast",
        "//parser/charset",
        "//parser/mysql",
        "//parser/test_driver",
        "@com_github_stretchr_testify//require",
    ],
)
